package com.spark.localvector

import org.apache.spark.mllib.linalg.Vectors
import org.apache.spark.mllib.regression.LabeledPoint

/**
  * Created by Administrator on 2017/8/21.
  */
object labeledPoint {
  def main(args: Array[String]): Unit = {

    val pos = LabeledPoint(1.0, Vectors.dense(1.0, 2.0, 3.0))
    val neg = LabeledPoint(0.0, Vectors.sparse(3, Array(0, 1, 2), Array(1.0, 2.0, 3.0)))


    println(pos)
    println(neg)


  }

}
